import { http } from "@/utils/http";

/** 获取绑定链接 */
export const getTelegramBindLink = () => {
  return http.request<any>("get", "/api/user/telegram/bind-link");
};

/** 获取解绑链接 */
export const getTelegramUnbindLink = () => {
  return http.request<any>("post", "/api/user/telegram/unbind");
};

/** 获取绑定详情 */
export const getTelegramBindDetails = () => {
  return http.request<any>("get", "/api/user/telegram/bind-details");
};

/** 获取通知设置 */
export const getTelegramNotificationSettings = () => {
  return http.request<any>("get", "/api/user/telegram/notification/settings");
};

/** 更新接受文件设置 */
export const updateTelegramReceiveFiles = (params: {
  receiveFiles: boolean;
}) => {
  return http.request<any>(
    "post",
    "/api/user/telegram/notification/receive-files",
    { params }
  );
};

/** 更新通知级别 */
export const updateTelegramNotificationLevel = (params: { level: string }) => {
  return http.request<any>("post", "/api/user/telegram/notification/level", {
    params
  });
};
